<ion-view view-title="短贷">
	<ion-content style="background-color:#f5f5f5;padding-top:10px;">
		<style type="text/css">
    	.item-complex.item-icon-right .item-content{
    		padding-left:10px;
    		padding-right:5px;
    		padding-top:0px;
    		padding-bottom:1px;
    	}

		a{ text-decoration:none;}		
		.mmm-container .h1{ font-size:14px; margin-bottom:20px; padding-top: 4%;box-sizing:border-box;color: #373737;font-style: normal;}
		.m-info i{color: #686868; margin-top: 5px;font-size:18px; vertical-align:top;float:left;line-height: 10px;margin-right:4px;margin-bottom: 20px;}
		.m-info input{ font-size:35px;   width:40%; border:none;}
		.m-info {margin-top: 7px; width:95%; border-bottom: 1px solid #f8f8f8;padding-bottom: 10px;padding-left: 0;}
		
    	.font-top{
    		text-align: center;font-size: 16px;color: blue;
    	}
    	.font-bottom{
    		text-align: center;font-size: 13px;
    	}
    	.font-tip{
    		text-align: center;font-size: 16px;
    	}
    	.left{text-align: left;}
    	.right{text-align: right;}
    	.center{text-align: center;}
    	.cjCss div.popup-head{
        	display:none;
      	}
      	.cjCss div.popup-body{
        	padding:0;
        	margin:0;

        	border: 0;
        	width: 100%;
      	}
      	.cjCss .popup{
      		width: 80%;
      		border: none;
      		background: none;
      	}
      	
      	
      	.zjCss div.popup-head{
        	display:none;
      	}
      	.zjCss div.popup-body{
        	padding:0;
        	margin:0;

        	border: 0;
        	width: 100%;
      	}
      	.zjCss .popup{
      		width: 80%;
      		border: none;
      		background: none;
      	}
      	
        </style>
        
		<ion-list style="margin-left:0px;background-color:#f5f5f5;">
			<ion-item class="item-remove-animate item-avatar item-icon-right" href="#/tab/zjrCreditCheck/{{user.userId}}" type="item-text-wrap" style="min-height:80px;height: 83px;font-size: 13px;margin-left:0px;">
				<div style="float: left;width: 60px;">
					<div ng-if="user.headPic!=null&&user.headPic!=''"><img ng-src="http://image.credit-manage.com/{{user.headPic}}" width="60" style="border-radius: 5px;margin-top: 10px;"></div>
					<div ng-if="user.headPic==null||user.headPic==''"><img ng-src="img/head.png" width="60" style="border-radius: 5px;margin-top: 10px;"></div>
				</div>
				<div style="float: left;margin-left: 10px;margin-top:20px;">
					<h2>{{user.name}}</h2>
					<p style="font-size: 13px;" ng-if="user.flag<=0">无逾期</p>
					<p style="font-size: 13px;" ng-if="user.flag>0">有{{user.flag}}笔逾期</p>
				</div>
				<i class="icon ion-ios-arrow-right"></i>
			</ion-item>
		</ion-list>

		<div style="height: 50px;background-color: white;height: 80px;">
			<div style="padding-top: 20px;">
				<div style="float: left;width: 33.3%;text-align: left;padding-left:20px;">
						<span style="color: blue;font-size: 16px;margin-left: 8%;">{{produce.totalPrice-produce.investAccount | number:0}}</span><br/>
						<span style="font-size: 13px;color: #A2A2A2;">尚需借款</span>
				</div>
				<div style="float: left;width: 33.3%;text-align: center;">
						<span style="color: blue;font-size: 16px;">{{produce.interestRates*100 | number:0}}%</span><br/>
						<span style="font-size: 13px;color: #A2A2A2;">年利率</span>
				</div>
				<div style="float: left;width: 33.3%;text-align: right;padding-right:20px;">
					<span style="color: blue;font-size: 16px;margin-right: 15%;">{{produce.deadLine | number:0}}</span><br/>
					<span style="font-size: 13px;color: #A2A2A2;">期限(天)</span>
				</div>
			</div>
		</div>
		<div class="list" style="margin-bottom: 0px;">
			<label class="item item-input">
  				<span class="input-label">还款日</span>
  				<span style="font-size:13px;">{{produce.deadTime | date:'yyyy-MM-dd'}}</span>
  			</label>
  			
			<label class="item item-input">
  				<span class="input-label">偿还方式</span>
  				<span style="font-size:13px;">到期一次性还本付息</span>
  			</label>
  			
			<label class="item item-input" style="border: none;">
			 	<span class="input-label">借款用途</span>
			</label>
			<div style="letter-spacing:1px;padding-left: 16px;background-color: white;padding-bottom:10px;">
				{{produce.memo}}
	 		</div>
  			
  			<label class="item item-input">
				<div class="mmm-container" style="width: 100%;">
					<span class="input-label">借出金额</span>
					<div class="m-info item-input">
						<i>￥</i>
				    	<input  maxlength="15" placeholder="0.00" ng-model="loanMoney" ng-change="brorrowChange(loanMoney,produce)"/>
					</div>
					<div class="row" style="padding-left: 0;font-size: 13px;">
						<div class="col col-50 left">到期后收益 ：{{appointment | number:2}}元</div>
						<div class="col col-50 left">当前账户余额 ：{{balance}}元</div>
					</div>
				</div> 
  			</label>
  			
  			<div class="item item-input {{tajShow}}" >
	  			<div class="row" style="padding-left: 0;font-size: 13px;">
	  				<div ng-if="loanred.length<=0" ng-click="getLoanRedList()"  class="col col-50 left" style="background: url(img/unCheckLoanRed.png) no-repeat; background-size:contain;padding-left: 45px;color: orange;"><font></font>使用投资券</div>
	  				<div ng-if="loanred.length>0" ng-click="getLoanRedList()"  class="col col-50 left" style="background: url(img/checkLoanRed.png) no-repeat; background-size:contain;padding-left: 45px;color: orange;">使用投资券</div>
	  			</div>
  			</div>
  			
  			<label class="item item-input">
	  			<div class="row" style="padding-left: 0;font-size: 13px;">
<!--	  				<div class="col col-50 left" >实际支付金额：{{loanMoney-loanRedAmt}}</div>
					<div class="col col-50 left">使用投资券金额：{{loanRedAmt}}</div>-->
				   <div class="col col-50 left" >实际支付金额：{{sjfk}}</div>
					<div class="col col-50 left">使用投资券金额：{{loanRedAmt}}</div>
	  			</div>
  			</label>
		</div>
		
		<div style="margin-right: 17px;margin-left: 17px;">
			<div ng-if="!recharge" >
				<button ng-if="isOk" class="button button-full button-positive" ng-click="borrow(produce.produceId,loanMoney,produce.totalPrice-produce.investAccount)" style="border-radius: 3px;">借给Ta</button>
	    		<button ng-if="!isOk" class="button button-full button-default"  style="border-radius: 3px;color: black;background: #e5e5e5;">借给Ta</button> 
			</div>		
    		<button ng-if="recharge" class="button button-full button-positive" ng-click="goRecharge()" >去充值</button>
    	</div>
    	
    	<div style="font-size: 12px;margin-left: 18px;margin-top: 10px;letter-spacing: 1px;margin-right: 10px;">
			<span style="color: #808080; display: block;">温馨提示：</span>
			<span style="color: #808080;">平台仅作为借贷信息媒介，请根据自己的风险偏好选择出借对象</span>
    	</div>
		<div style="margin-top: 2px;padding-left:18px;font-size:12px;">
			我已同意《<a href="#/tab/zjrcjrxy">出借人协议</a>》《<a href="#/tab/zjrjdxy">借贷协议</a>》
		</div>
    	
    	<div ng-if="detailsShow">
	    	<div style="height: 10px;background-color: #F8F8F8;"></div>
			
			<div style="clear: left;">
				<div style="text-align: center;font-size:13px;color:#808080;margin-top:10px;margin-bottom: 10px;border-bottom: 1px solid #F8F8F8;"><strong>-出借人列表-</strong><br><span style="color: #B2B2B2;">请不要辜负出借人对您的信任哦</span></div>
				<ion-list>
					<ion-item class="item-remove-animate item-avatar item-icon-right" type="item-text-wrap" style="border:0px;padding:0px;min-height: 30px;font-size:13px;color:#808080">
						<div class="row">
						  <div class="col" style="margin-left: 10px;"><strong>出借人姓名</strong></div>
						  <div class="col" style="text-align: center;"><strong>出借金额</strong></div>
						  <div class="col" style="text-align: right;margin-right: 10px;"><strong>出借日期</strong></div>
						</div>
					</ion-item>
					<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="detail in details" type="item-text-wrap" style="border:0px;padding:0px;min-height: 40px;font-size:13px;color:#808080">
						<div class="row">
						  <div class="col" style="margin-left: 10px;" ng-if="detail.createTime>=1484373600000">{{detail.name}}{{detail.phone}}</div>
						  <div class="col" style="margin-left: 10px;" ng-if="detail.createTime<1484373600000&&detail.userId=='39d33a00-8a58-458f-a388-a3b596c838ad'">{{detail.name}}{{detail.phone}}</div>
						  <div class="col" style="margin-left: 10px;" ng-if="detail.createTime<1484373600000&&detail.userId!='39d33a00-8a58-458f-a388-a3b596c838ad'">{{detail.name}}{{detail.phone}}</div>
						  
						  <div class="col" style="text-align: center;">{{detail.loanMoney}}</div>
						  <div class="col" style="text-align: right;margin-right: 10px;">{{detail.createTime | date:'yyyy-MM-dd'}}</div>
						</div>
					</ion-item>
				</ion-list>
			</div>
		</div>

	</ion-content>
</ion-view>
